import unittest
from data.queryRolePage_data import RomoverUserData
from api.base.sys.user.queryInfoPage import QueryInfoPage
from api.base.sys.user.removeOpById import RemoveOpById
from ddt import ddt, data,unpack

rom = RomoverUserData()

query = QueryInfoPage()

remove = RemoveOpById()


@ddt
class RemoveUser(unittest.TestCase):

    @data(*rom.data)
    def test_01_remove_user(self,uname):
        """删除01case创建的用户"""
        a = remove.remove_user(uname)
        print(a)
        self.assertEqual(a['success'], True, '删除失败！')
        b = query.query_user(uname)
        self.assertEqual(b['data']['data'], [], '断言失败！')

if __name__ == '__main__':
    unittest.main()